home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-15 | 15.9 KB | 461 lines | [TEXT/MPS ] |
- /************************************************************/
- /* */
- /* File: CDEVTester.r */
- /* Version: 1.0 */
- /* Author: Bob Haven */
- /* Copyright: (c) 1991 by Apple Computer, Inc. */
- /* */
- /* Description: This file contains the resource */
- /* definitions used by the CDEVTester */
- /* CDEV. This CDEV was created from */
- /* Greg Branch's Folder Privilages */
- /* CDEV code. */
- /* */
- /************************************************************/
-
- #include "TypesIIGS.r" // include the type definitions
- #include "rDefs.h" // include defines
-
- /************************************************************/
- /* Read the resources built elsewhere */
- /************************************************************/
-
- read rCDEVCode (1, Convert) "FP.Code"; // this is the code resource
-
- /************************************************************/
- /* Define a couple of resourses for file info */
- /************************************************************/
-
- resource rVersion (1) {
- {1,0,0,alpha,1},
- verUS,
- "CDEVTester",
- "Copyright 1989-91, Apple Computer, Inc."
- };
-
- resource rComment (1) {
- "The CDEVTester tests most of the messages passed by the Control Panel to the "
- "the CDEVTester. The messages are passed if the their appropriate bit has been "
- "set in CDEV's rCDEVFlags resource. The only unsupported message is the ShutDownCDEV "
- "message."
- };
-
-
- /************************************************************/
- /* Define our resources */
- /************************************************************/
-
- resource rCDEVFlags (1) {
- wantMachine + /* this flag is currently not used */
- wantBoot +
- /* wantShutDown + */ /* this flag is currently not used */
- wantInit +
- wantClose +
- wantEvents +
- wantCreate +
- wantAbout +
- wantRect +
- wantHit +
- wantRun +
- wantEdit +
- /* wantReserved2 + */ /* this flag is currently not used */
- /* wantReserved2 + */ /* this flag is currently not used */
- /* updateSSfromBRAM + */ /* this flag is used by Apple Only!!! */
- CanBeInActive, /* CDEV flags */
- 1, // enabled = True
- 1, // Version = 1
- 1, // Machine = v1 ROMs or higher
- 6, // System = v6.0 or higher
- {0,0,175,200}, // DataRect - top left MUST be 0,0
- "CDEVTester", // Name
- "Bob Haven", // Author
- "v1.0a1"; // Version String
- };
-
- /************************************************************/
- /* Define About Box resources */
- /************************************************************/
-
- resource rControlTemplate (AboutID) {
- AboutID, // control ID
- {35,0,140,295}, // rect
- editTextControl {{
- 0b0000000000000000, // flags
- 0b0111010000001111, // more flags
- 0, // refCon
- 0b01000100100100000000000000000000, // text flags
- {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, // indent rect
- 0xFFFFFFFF, // vert scroll bar
- 0x0000, // vert scroll amount
- 0, // horiz scroll bar
- 0, // horiz scroll amount
- 0, // style ref
- 0b0000000000010101, // text descriptor
- AboutText, // text ref
- 0 // text length
- }},
- };
-
- resource rText (AboutText) {
- "This CDEV tests all messages that can be passed by a CDEV. "
- "Some of the code for this CDEV was borrowed from the 'Folder "
- "Privileges' CDEV written by Greg Branche. I would like to thank:\n\n"
- "Greg Branche - for borrowing his code.\n\n"
- "Anil Gursahani - for helping implement the time updating routine.\n\n"
- "Ben Koning - for writing the assembly routine for matching the system copy of "
- "BRAM parameters to the actual BRAM parameters.\n\n"
- "Andy Nicholas - for general debugging help.\n\n"
- "Dave Lyons - for reminding me not to call FrontWindow from my CDEV.\n\n"
- "Jumpin Johnny - for having me write this thing in the first place.\n\n"
- "The LeMonster - for being such a nice guy.\n\n"
- "And Margarita Sang - for finding my Bonehead mistakes.\n\n"
- "This CDEV should work on any IIGS ROM 01 or O3 machine running System "
- "Software V5.0 or greater.\n\n"
- "The following are the messages that can be passed and what "
- "to look for to verify that these messages are being passed "
- "and handled properly: \n\n"
- "MachineCDEV:\n"
- "An MachineCDEV AlertWindow will be displayed before opening the CDEV.\n\n"
- "BootCDEV:\n"
- "The icon in this AboutBox will be displayed at boot time.\n\n"
- "InitCDEV:\n"
- "An InitCDEV AlertWindow will be displayed before opening the CDEV informing "
- "the user that some of the CDEV's controls have been deactivated.\n\n"
- "CloseCDEV:\n"
- "A CloseCDEV AlertWindow will be displayed when CDEV is closed.\n\n"
- "EventsCDEV:\n"
- "Select the checkbox of the event you want to post then create the event. "
- "An AlertWindow will be displayed after the event is created. Clearing the "
- "AlertWindow will reset the checkboxes. The checkboxes of upsupported events "
- "have been dimmed by the InitCDEV proc.\n\n"
- "Null Event - Not supported.\n\n"
- "MouseDown Event - AlertWindow; click anywhere on the CDEV window.\n\n"
- "MouseUp Event - AlertWindow; click anywhere on the desktop.\n\n"
- "KeyDown Event - AlertWindow; press any key without the caps lock down (including "
- "modifiers).\n\n"
- "AutoKey Event - AlertWindow; hold any key down without the caps lock down "
- "(inclding modifiers).\n\n"
- "Update Event - AlertWindow; move another window over the CDEV window and then off "
- "or move part of the CDEV window off screen and then back.\n\n"
- "Activate Event - AlertWindow; click on another window and then on the CDEV window.\n\n"
- "Switch Event - Not supported.\n\n"
- "DeskAccessory Event - The Desk Manager intercepts this event.\n\n"
- "Driver Event - Not supported.\n\n"
- "Application Event - Not supported.\n\n"
- "CreateCDEV:\n"
- "The CDEV controls drawn properly verify this message.\n\n"
- "AboutCDEV:\n"
- "The About Box controls drawn properly verify this message.\n\n"
- "RectCDEV:\n"
- "An AlertWindow is displayed informing you that the CDEV window is being resized.\n\n"
- "HitCDEV:\n"
- "AlertWindow; click on the 'ASCII Time' or 'Check A Box' StaticTextControl.\n\n"
- "RunCDEV:\n"
- "Updating of the ASCII Time will verify this message.\n\n"
- "EditCDEV:\n"
- "AlertWindow; select one of the following from the Edit Menu (Undo, Cut, Copy, Paste, "
- "or Clear)."
- };
-
- /************************************************************/
- /* Define Control resources */
- /************************************************************/
-
- //----------------------------------------------------------------------------------
- // Control List
-
- resource rControlList (myCtrlList) {{
- CheckABoxText, /* control resource id for CheckABoxText StatText control */
- NullEventCheckBox, /* control resource id for NullEventCheckBox control */
- MouseDownEventCheckBox, /* control resource id for MouseDownEventCheckBox control */
- MouseUpEventCheckBox, /* control resource id for MouseUpEventCheckBox control */
- KeyDownEventCheckBox, /* control resource id for KeyDownEventCheckBox control */
- AutoKeyEventCheckBox, /* control resource id for AutoKeyEventCheckBox control */
- UpdateEventCheckBox, /* control resource id for UpdateEventCheckBox control */
- ActivateEventCheckBox, /* control resource id for ActivateEventCheckBox control */
- SwitchEventCheckBox, /* control resource id for ActivateEventCheckBox control */
- DeskAccEventCheckBox, /* control resource id for DeskAccEventCheckBox control */
- DriverEventCheckBox, /* control resource id for DriverEventCheckBox control */
- ASCIITimeStaticText /* control resource id for ASCIITimeStaticText StatText control */
- };};
-
- //----------------------------------------------------------------------------------
- // CheckABoxText StaticText control
-
- resource rControlTemplate (CheckABoxText) {
- CheckABoxText, /* control id */
- {5,10,15,180}, /* control rectangle */
- statTextControl{{ /* control type */
- 0x0000, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- CheckABoxText, /* text reference */
- 0x0000, /* text length */
- 0x0001 /* text justification */
- }};
- };
-
- resource rTextForLETextBox2 (CheckABoxText) {
- "Check A Box"
- };
-
- //----------------------------------------------------------------------------------
- // NullEventCheckBox control
-
- resource rControlTemplate (NullEventCheckBox) {
- NullEventCheckBox, /* control id */
- {15,10,25,180}, /* control rectangle */
- CheckControl{{ /* control type */
- 0x0001, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- NullEventCheckBox, /* title reference */
- 0x0000 /* inital value */
- }};
- };
-
- resource rPString (NullEventCheckBox) {
- "Null Event Flag"
- };
-
- //----------------------------------------------------------------------------------
- // MouseDownEventCheckBox control
-
- resource rControlTemplate (MouseDownEventCheckBox) {
- MouseDownEventCheckBox, /* control id */
- {25,10,35,180}, /* control rectangle */
- CheckControl{{ /* control type */
- 0x0001, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- MouseDownEventCheckBox, /* title reference */
- 0x0000 /* inital value */
- }};
- };
-
- resource rPString (MouseDownEventCheckBox) {
- "MouseDown Event Flag"
- };
-
- //----------------------------------------------------------------------------------
- // MouseUpEventCheckBox control
-
- resource rControlTemplate (MouseUpEventCheckBox) {
- MouseUpEventCheckBox, /* control id */
- {35,10,45,180}, /* control rectangle */
- CheckControl{{ /* control type */
- 0x0001, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- MouseUpEventCheckBox, /* title reference */
- 0x0000 /* inital value */
- }};
- };
-
- resource rPString (MouseUpEventCheckBox) {
- "MouseUp Event Flag"
- };
-
- //----------------------------------------------------------------------------------
- // KeyDownEventCheckBox control
-
- resource rControlTemplate (KeyDownEventCheckBox) {
- KeyDownEventCheckBox, /* control id */
- {45,10,55,180}, /* control rectangle */
- CheckControl{{ /* control type */
- 0x0001, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- KeyDownEventCheckBox, /* title reference */
- 0x0000 /* inital value */
- }};
- };
-
- resource rPString (KeyDownEventCheckBox) {
- "KeyDown Event Flag"
- };
-
- //----------------------------------------------------------------------------------
- // AutoKeyEventCheckBox control
-
- resource rControlTemplate (AutoKeyEventCheckBox) {
- AutoKeyEventCheckBox, /* control id */
- {55,10,65,180}, /* control rectangle */
- CheckControl{{ /* control type */
- 0x0001, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- AutoKeyEventCheckBox, /* title reference */
- 0x0000 /* inital value */
- }};
- };
-
- resource rPString (AutoKeyEventCheckBox) {
- "AutoKey Event Flag"
- };
-
- //----------------------------------------------------------------------------------
- // UpdateEventCheckBox control
-
- resource rControlTemplate (UpdateEventCheckBox) {
- UpdateEventCheckBox, /* control id */
- {65,10,75,180}, /* control rectangle */
- CheckControl{{ /* control type */
- 0x0001, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- UpdateEventCheckBox, /* title reference */
- 0x0000 /* inital value */
- }};
- };
-
- resource rPString (UpdateEventCheckBox) {
- "Update Event Flag"
- };
-
- //----------------------------------------------------------------------------------
- // ActivateEventCheckBox control
-
- resource rControlTemplate (ActivateEventCheckBox) {
- ActivateEventCheckBox, /* control id */
- {75,10,85,180}, /* control rectangle */
- CheckControl{{ /* control type */
- 0x0001, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- ActivateEventCheckBox, /* title reference */
- 0x0000 /* inital value */
- }};
- };
-
- resource rPString (ActivateEventCheckBox) {
- "Activate Event Flag"
- };
-
- //----------------------------------------------------------------------------------
- // SwitchEventCheckBox control
-
- resource rControlTemplate (SwitchEventCheckBox) {
- SwitchEventCheckBox, /* control id */
- {85,10,95,180}, /* control rectangle */
- CheckControl{{ /* control type */
- 0x0001, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- SwitchEventCheckBox, /* title reference */
- 0x0000 /* inital value */
- }};
- };
-
- resource rPString (SwitchEventCheckBox) {
- "Switch Event Flag"
- };
-
- //----------------------------------------------------------------------------------
- // DeskAccEventCheckBox control
-
- resource rControlTemplate (DeskAccEventCheckBox) {
- DeskAccEventCheckBox, /* control id */
- {95,10,105,180}, /* control rectangle */
- CheckControl{{ /* control type */
- 0x0001, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- DeskAccEventCheckBox, /* title reference */
- 0x0000 /* inital value */
- }};
- };
-
- resource rPString (DeskAccEventCheckBox) {
- "DeskAcc Event Flag"
- };
-
- //----------------------------------------------------------------------------------
- // DriverEventCheckBox control
-
- resource rControlTemplate (DriverEventCheckBox) {
- DriverEventCheckBox, /* control id */
- {105,10,115,180}, /* control rectangle */
- CheckControl{{ /* control type */
- 0x0001, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- DriverEventCheckBox, /* title reference */
- 0x0000 /* inital value */
- }};
- };
-
- resource rPString (DriverEventCheckBox) {
- "Driver Event Flag"
- };
-
- //----------------------------------------------------------------------------------
- // ASCII Time StaticText control
-
- resource rControlTemplate (ASCIITimeStaticText) {
- ASCIITimeStaticText, /* control id */
- {120,16,130,175}, /* control rectangle */
- statTextControl{{ /* control type */
- 0x0000, /* flags */
- 0x1002, /* more flags */
- 0, /* ref con */
- ASCIITimeStaticText, /* text reference */
- 0x0000, /* text length */
- 0x0001 /* text justification */
- }};
- };
-
- resource rTextForLETextBox2 (ASCIITimeStaticText) {
- "ASCII Time"
- };
-
- //###########################################################
- //# Define icon resource #
- //###########################################################
-
- resource rIcon (1) { // the "CDEV" icon
- 0x8000, // kind
- 20, // height
- 28, // width
- $"FFFFFFFFFFFFF00FFFFFFFFFFFFF"
- $"FFFFFFFFFFFF0ee0FFFFFFFFFFFF"
- $"FFFFFFFFFFF0eeee0FFFFFFFFFFF"
- $"FFFFFFFFFFF0eeee0FFFFFFFFFFF"
- $"FFFFFFFFFFF0e00e0FFFFFFFFFFF"
- $"FFFFFFFFFF00e00e00FFFFFFFFFF"
- $"FFFFFFFFFF00e00e00FFFFFFFFFF"
- $"FFFFFFFFF000eeee000FFFFFFFFF"
- $"FFFFFF0eee00eeee00eee0FFFFFF"
- $"0FFF0eeeeee0eeee0eeeeee0FFF0"
- $"0F0eeeeeeeee0ee0eeeeeeeee0F0"
- $"00eeeeeeeee0eeee0eeeeeeeee00"
- $"0F0eeeeeeee0eeee0eeeeeeee0F0"
- $"0FF0000000F0eeee0F0000000FF0"
- $"FFFFFFFFFFF0eeee0FFFFFFFFFFF"
- $"FFFFFFFFFFF0eeee0FFFFFFFFFFF"
- $"FFFFFFFFFF0ee00ee0FFFFFFFFFF"
- $"FFFFFFFF0eeee00eeee0FFFFFFFF"
- $"FFFFFF0eeeeee00eeeeee0FFFFFF"
- $"FFFFFFF00000F00F00000FFFFFFF",
-
- $"0000000000000FF0000000000000"
- $"000000000000FFFF000000000000"
- $"00000000000FFFFFF00000000000"
- $"00000000000FFFFFF00000000000"
- $"00000000000FFFFFF00000000000"
- $"0000000000FFFFFFFF0000000000"
- $"0000000000FFFFFFFF0000000000"
- $"000000000FFFFFFFFFF000000000"
- $"F00000FFFFFFFFFFFFFFFF00000F"
- $"F000FFFFFFFFFFFFFFFFFFFF000F"
- $"F0FFFFFFFFFFFFFFFFFFFFFFFF0F"
- $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
- $"F0FFFFFFFFFFFFFFFFFFFFFFFF0F"
- $"F00FFFFFFFFFFFFFFFFFFFFFF00F"
- $"00000000000FFFFFF00000000000"
- $"00000000000FFFFFF00000000000"
- $"0000000000FFFFFFFF0000000000"
- $"00000000FFFFFFFFFFFF00000000"
- $"000000FFFFFFFFFFFFFFFF000000"
- $"0000000FFFFFFFFFFFFFF0000000"
- };